3.1.99 \(\int \log (\frac {c x^2}{(b+a x)^2}) \, dx\) [99]

Optimal. Leaf size=28 \[ x \log \left (\frac {c x^2}{(b+a x)^2}\right )-\frac {2 b \log (b+a x)}{a} \]

[Out]

x*ln(c*x^2/(a*x+b)^2)-2*b*ln(a*x+b)/a

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 28, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {2536, 31} \begin {gather*} x \log \left (\frac {c x^2}{(a x+b)^2}\right )-\frac {2 b \log (a x+b)}{a} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Log[(c*x^2)/(b + a*x)^2],x]

[Out]

x*Log[(c*x^2)/(b + a*x)^2] - (2*b*Log[b + a*x])/a

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 2536

Int[((A_.) + Log[(e_.)*((a_.) + (b_.)*(x_))^(n_.)*((c_.) + (d_.)*(x_))^(mn_)]*(B_.))^(p_.), x_Symbol] :> Simp[
(a + b*x)*((A + B*Log[e*((a + b*x)^n/(c + d*x)^n)])^p/b), x] - Dist[B*n*p*((b*c - a*d)/b), Int[(A + B*Log[e*((
a + b*x)^n/(c + d*x)^n)])^(p - 1)/(c + d*x), x], x] /; FreeQ[{a, b, c, d, e, A, B, n}, x] && EqQ[n + mn, 0] &&
 NeQ[b*c - a*d, 0] && IGtQ[p, 0]

Rubi steps

\begin {align*} \int \log \left (\frac {c x^2}{(b+a x)^2}\right ) \, dx &=x \log \left (\frac {c x^2}{(b+a x)^2}\right )-(2 b) \int \frac {1}{b+a x} \, dx\\ &=x \log \left (\frac {c x^2}{(b+a x)^2}\right )-\frac {2 b \log (b+a x)}{a}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.00, size = 28, normalized size = 1.00 \begin {gather*} x \log \left (\frac {c x^2}{(b+a x)^2}\right )-\frac {2 b \log (b+a x)}{a} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Log[(c*x^2)/(b + a*x)^2],x]

[Out]

x*Log[(c*x^2)/(b + a*x)^2] - (2*b*Log[b + a*x])/a

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(58\) vs. \(2(28)=56\).
time = 0.45, size = 59, normalized size = 2.11

method result size
risch \(x \ln \left (\frac {c \,x^{2}}{\left (a x +b \right )^{2}}\right )-\frac {2 b \ln \left (a x +b \right )}{a}\) \(29\)
derivativedivides \(-\frac {-\left (a x +b \right ) \ln \left (\frac {c \left (\frac {b}{a x +b}-1\right )^{2}}{a^{2}}\right )+2 b \left (-\ln \left (\frac {1}{a x +b}\right )+\ln \left (\frac {b}{a x +b}-1\right )\right )}{a}\) \(59\)
default \(-\frac {-\left (a x +b \right ) \ln \left (\frac {c \left (\frac {b}{a x +b}-1\right )^{2}}{a^{2}}\right )+2 b \left (-\ln \left (\frac {1}{a x +b}\right )+\ln \left (\frac {b}{a x +b}-1\right )\right )}{a}\) \(59\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(ln(c*x^2/(a*x+b)^2),x,method=_RETURNVERBOSE)

[Out]

-1/a*(-(a*x+b)*ln(c*(b/(a*x+b)-1)^2/a^2)+2*b*(-ln(1/(a*x+b))+ln(b/(a*x+b)-1)))

________________________________________________________________________________________

Maxima [A]
time = 0.28, size = 28, normalized size = 1.00 \begin {gather*} x \log \left (\frac {c x^{2}}{{\left (a x + b\right )}^{2}}\right ) - \frac {2 \, b \log \left (a x + b\right )}{a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(c*x^2/(a*x+b)^2),x, algorithm="maxima")

[Out]

x*log(c*x^2/(a*x + b)^2) - 2*b*log(a*x + b)/a

________________________________________________________________________________________

Fricas [A]
time = 0.33, size = 41, normalized size = 1.46 \begin {gather*} \frac {a x \log \left (\frac {c x^{2}}{a^{2} x^{2} + 2 \, a b x + b^{2}}\right ) - 2 \, b \log \left (a x + b\right )}{a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(c*x^2/(a*x+b)^2),x, algorithm="fricas")

[Out]

(a*x*log(c*x^2/(a^2*x^2 + 2*a*b*x + b^2)) - 2*b*log(a*x + b))/a

________________________________________________________________________________________

Sympy [A]
time = 0.06, size = 26, normalized size = 0.93 \begin {gather*} x \log {\left (\frac {c x^{2}}{\left (a x + b\right )^{2}} \right )} - \frac {2 b \log {\left (a x + b \right )}}{a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(ln(c*x**2/(a*x+b)**2),x)

[Out]

x*log(c*x**2/(a*x + b)**2) - 2*b*log(a*x + b)/a

________________________________________________________________________________________

Giac [A]
time = 3.87, size = 29, normalized size = 1.04 \begin {gather*} x \log \left (\frac {c x^{2}}{{\left (a x + b\right )}^{2}}\right ) - \frac {2 \, b \log \left ({\left | a x + b \right |}\right )}{a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(c*x^2/(a*x+b)^2),x, algorithm="giac")

[Out]

x*log(c*x^2/(a*x + b)^2) - 2*b*log(abs(a*x + b))/a

________________________________________________________________________________________

Mupad [B]
time = 0.15, size = 28, normalized size = 1.00 \begin {gather*} x\,\ln \left (\frac {c\,x^2}{{\left (b+a\,x\right )}^2}\right )-\frac {2\,b\,\ln \left (b+a\,x\right )}{a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(log((c*x^2)/(b + a*x)^2),x)

[Out]

x*log((c*x^2)/(b + a*x)^2) - (2*b*log(b + a*x))/a

________________________________________________________________________________________